home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-23 | 97.1 KB | 3,210 lines |
- Subject: BETA TEST 2 of elm 2.4 Patch #23c
- Summary: This is an official patch for elm 2.4 system. Please apply it.
- Priority: HIGH
-
- THIS IS PART 3 OF A 4 PART PATCH
-
- THIS PATCH IS IN BETA TEST. IT IS SUBJECT TO CHANGE.
- SAVE YOUR ORIGINAL COPY OF ELM SOURCES SO YOU CAN BACK THIS OUT BEFORE
- APPLYING THE OFFICIAL PATCH
-
- Fix: From rn, say "| patch -p -N -d DIR", where DIR is your elm source
- directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
- If you don't have the patch program, apply the following by hand,
- or get patch (version 2.0, latest patchlevel).
-
- After patching:
- Apply patches 23d next
-
- If patch indicates that patchlevel is the wrong version, you may need
- to apply one or more previous patches, or the patch may already
- have been applied. See the patchlevel.h file to find out what has or
- has not been applied. In any event, don't continue with the patch.
-
- If you are missing previous patches they can be obtained from our:
- archive server.
-
- Syd Weinstein
- elm@DSI.COM
-
- The patches are available from the dsinc archive server
- Send the following message to archive-server@DSI.COM for
- a list of available patches:
-
- Subject: patch list
- send index elm
-
- Index: lib/parsarpwho.c
- Prereq: 5.3
- *** ../elm2.4/lib/parsarpwho.c Tue Jan 19 00:07:19 1993
- --- lib/parsarpwho.c Mon Jul 19 22:06:41 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: parsarpwho.c,v 5.3 1993/01/19 05:07:05 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.3 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: parsarpwho.c,v 5.4 1993/07/20 02:06:13 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,23 ----
- *
- *******************************************************************************
- * $Log: parsarpwho.c,v $
- + * Revision 5.4 1993/07/20 02:06:13 syd
- + * Changes for vms problem
- + * From: M.รก Anio
- + *
- * Revision 5.3 1993/01/19 05:07:05 syd
- * Trim erroreous extra log entry
- * From: Syd
- ***************
- *** 49,54 ****
- --- 53,60 ----
- or From: hplabs!dat (Dave Taylor)
-
- Added: removes quotes if name is quoted (12/12)
- + HOWEVER: From: "NAME \"VMS USER\"" <USER@VMS>
- + must be handled delicately !
- Added: only copies STRING characters...
- Added: if no comment part, copy address instead!
- Added: if is_really_a_to, this is really a 'to' line
- ***************
- *** 119,134 ****
-
- if (strlen(temp) > 0) { /* mess with buffer... */
-
- ! /* remove leading spaces and quotes... */
-
- ! while (whitespace(temp[0]) || temp[0] == '"')
- temp = (char *) (temp + 1); /* increment address! */
-
- ! /* remove trailing spaces and quotes... */
-
- i = strlen(temp) - 1;
-
- ! while (i >= 0 && (whitespace(temp[i]) || temp[i] == '"'))
- temp[i--] = '\0';
-
- /* if anything is left, let's change 'from' value! */
- --- 125,150 ----
-
- if (strlen(temp) > 0) { /* mess with buffer... */
-
- ! /* remove leading spaces and ONE quote... */
-
- ! while (whitespace(temp[0]))
- ! temp = (char *) (temp + 1); /* increment address! */
- ! if (temp[0] == '"')
- ! temp = (char *) (temp + 1); /* increment address! */
- ! while (whitespace(temp[0]))
- temp = (char *) (temp + 1); /* increment address! */
-
- ! /* remove trailing spaces and ONE quote... */
-
- i = strlen(temp) - 1;
-
- ! while (i >= 0 && (whitespace(temp[i])))
- ! temp[i--] = '\0';
- ! /* Can delete ONE trailing quote, NOT THEM ALL!
- ! Assuming the incoming quotes were all right.. [mea@utu.fi] */
- ! if (i >= 0 && temp[i] == '"')
- ! temp[i--] = '\0';
- ! while (i >= 0 && (whitespace(temp[i])))
- temp[i--] = '\0';
-
- /* if anything is left, let's change 'from' value! */
-
- Index: lib/posixsig.c
- Prereq: 5.6
- *** ../elm2.4/lib/posixsig.c Tue Apr 20 21:16:46 1993
- --- lib/posixsig.c Sun Aug 22 22:46:55 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: posixsig.c,v 5.6 1993/04/21 01:16:45 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.6 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: posixsig.c,v 5.8 1993/08/23 02:46:51 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.8 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,27 ----
- *
- *******************************************************************************
- * $Log: posixsig.c,v $
- + * Revision 5.8 1993/08/23 02:46:51 syd
- + * Test ANSI_C, not __STDC__ (which is not set on e.g. AIX).
- + * From: decwrl!uunet.UU.NET!fin!chip (Chip Salzenberg)
- + *
- + * Revision 5.7 1993/08/03 20:14:49 syd
- + * Fix where some systems name SIG_ERR BADSIG
- + * From: Syd
- + *
- * Revision 5.6 1993/04/21 01:16:45 syd
- * SunOS 4.1.3 uses the BSD convention for signal handling in system
- * calls like read. The system call resumes when the signal handler
- ***************
- *** 51,61 ****
- #include "headers.h"
-
- #ifdef POSIX_SIGNALS
- /*
- * This routine used to duplicate the old signal() calls
- */
- SIGHAND_TYPE
- ! #if (defined(__STDC__) && !defined(apollo))
- (*posix_signal(signo, fun))(int)
- int signo;
- SIGHAND_TYPE (*fun)(int);
- --- 59,78 ----
- #include "headers.h"
-
- #ifdef POSIX_SIGNALS
- +
- + #ifndef SIG_ERR
- + # ifdef BADSIG
- + # define SIG_ERR BADSIG
- + # else
- + # define SIG_ERR -1
- + # endif /* BADSIG */
- + #endif /* SIG_ERRR */
- +
- /*
- * This routine used to duplicate the old signal() calls
- */
- SIGHAND_TYPE
- ! #if ANSI_C && !defined(apollo)
- (*posix_signal(signo, fun))(int)
- int signo;
- SIGHAND_TYPE (*fun)(int);
-
- Index: lib/qstrings.c
- Prereq: 5.1
- *** ../elm2.4/lib/qstrings.c Sat Oct 3 18:42:28 1992
- --- lib/qstrings.c Tue Aug 3 15:28:56 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: qstrings.c,v 5.1 1992/10/03 22:41:36 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.1 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: qstrings.c,v 5.2 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: qstrings.c,v $
- + * Revision 5.2 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.1 1992/10/03 22:41:36 syd
- * Initial checkin as of 2.4 Release at PL0
- *
- ***************
- *** 26,37 ****
- **/
-
- #include "headers.h"
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef tolower
- - #undef toupper
- - #endif
-
- char *qstrpbrk(source, keys)
- char *source, *keys;
- --- 38,43 ----
-
- Index: lib/realfrom.c
- Prereq: 5.3
- *** ../elm2.4/lib/realfrom.c Sat May 8 13:09:56 1993
- --- lib/realfrom.c Tue Aug 3 15:28:56 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: realfrom.c,v 5.3 1993/05/08 17:09:56 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.3 $ $State: Exp $
- *
- * Copyright (c) 1993 USENET Community Trust
- *******************************************************************************
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: realfrom.c,v 5.4 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1993 USENET Community Trust
- *******************************************************************************
- ***************
- *** 13,18 ****
- --- 13,30 ----
- *
- *******************************************************************************
- * $Log: realfrom.c,v $
- + * Revision 5.4 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.3 1993/05/08 17:09:56 syd
- * Fix problem where "<space>From" was recognized as a valid "From_" line.
- * From: decwrl!decvax!gatech!WLK.COM!chip (Chip Rosenthal)
- ***************
- *** 30,40 ****
-
-
- #include "headers.h"
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef tolower
- - #endif
-
-
- extern long make_gmttime();
- --- 42,47 ----
-
- Index: lib/rfc822tlen.c
- *** /dev/null Sun Aug 22 23:14:45 1993
- --- lib/rfc822tlen.c Mon Jul 19 23:15:24 1993
- ***************
- *** 0 ****
- --- 1,155 ----
- +
- + static char rcsid[] = "@(#)$Id: rfc822tlen.c,v 5.2 1993/07/20 03:15:15 syd Exp $";
- +
- + /*******************************************************************************
- + * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- + *
- + * Copyright (c) 1993 USENET Community Trust
- + *******************************************************************************
- + * Bug reports, patches, comments, suggestions should be sent to:
- + *
- + * Syd Weinstein, Elm Coordinator
- + * elm@DSI.COM dsinc!elm
- + *
- + *******************************************************************************
- + * $Log: rfc822tlen.c,v $
- + * Revision 5.2 1993/07/20 03:15:15 syd
- + * remove extra garbage line
- + *
- + * Revision 5.1 1993/06/10 03:02:20 syd
- + * Initial Checkin
- + *
- + *
- + ******************************************************************************/
- +
- + #include <stdio.h>
- +
- + /*
- + * rfc822_toklen(str) - Returns length of RFC-822 token that starts at "str".
- + *
- + * We understand the following tokens:
- + *
- + * linear-white-space
- + * specials
- + * "quoted string"
- + * [domain.literal]
- + * (comment)
- + * CTL (control chars)
- + * atom
- + */
- +
- + #define charlen(s) ((s)[0] == '\\' && (s)[1] != '\0' ? 2 : 1)
- +
- + #define IS822_SPECIAL(c) ( \
- + ((c) == '(') || ((c) == ')') || ((c) == '<') || ((c) == '>') \
- + || ((c) == '@') || ((c) == ',') || ((c) == ';') || ((c) == ':') \
- + || ((c) == '\\') || ((c) == '"') || ((c) == '.') || ((c) == '[') \
- + || ((c) == ']') \
- + )
- +
- + /*
- + * RFC-822 defines SPACE to be just < > and HTAB, but after LWSP folding
- + * CR and NL should be equivalent.
- + */
- + #define IS822_SPACE(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')
- +
- + /*
- + * We've thrown non-ASCII (value > 0177) into this.
- + */
- + #define IS822_CTL(c) ((c) <= 037 || (c) >= 0177)
- +
- + #define IS822_ATOMCH(c) (!IS822_SPECIAL(c) && !IS822_SPACE(c) && !IS822_CTL(c))
- +
- +
- + int rfc822_toklen(str)
- + register char *str;
- + {
- + char *str0;
- + int depth;
- + register int chlen;
- +
- + str0 = str;
- +
- + if (*str == '"') { /* quoted-string */
- + ++str;
- + while (*str != '\0' && *str != '"')
- + str += charlen(str);
- + if (*str != '\0')
- + ++str;
- + return (str-str0);
- + }
- +
- + if (*str == '(' ) { /* comment */
- + ++str;
- + depth = 0;
- + while (*str != '\0' && (*str != ')' || depth > 0)) {
- + switch (*str) {
- + case '(':
- + ++str;
- + ++depth;
- + break;
- + case ')':
- + ++str;
- + --depth;
- + break;
- + default:
- + str += charlen(str);
- + break;
- + }
- + }
- + if (*str != '\0')
- + ++str;
- + return (str-str0);
- + }
- +
- +
- + if (*str == '[') { /* domain-literal */
- + ++str;
- + while (*str != '\0' && *str != ']')
- + str += charlen(str);
- + if (*str != '\0')
- + ++str;
- + return (str-str0);
- + }
- +
- + if (IS822_SPACE(*str)) { /* linear-white-space */
- + while (++str, IS822_SPACE(*str))
- + ;
- + return (str-str0);
- + }
- +
- + if (IS822_SPECIAL(*str) || IS822_CTL(*str))
- + return charlen(str); /* specials and CTL */
- +
- + /*
- + * Treat as an "atom".
- + */
- + while (IS822_ATOMCH(*str))
- + ++str;
- + return (str-str0);
- + }
- +
- +
- + #ifdef _TEST
- + main()
- + {
- + char buf[1024], *bp;
- + int len;
- + for (;;) {
- + fputs("\nstr> ", stdout);
- + fflush(stdout);
- + if (gets(buf) == NULL) {
- + putchar('\n');
- + break;
- + }
- + bp = buf;
- + while (*bp != '\0') {
- + len = rfc822_toklen(bp);
- + printf("len %4d |%.*s|\n", len, len, bp);
- + bp += len;
- + }
- + }
- + exit(0);
- + }
- + #endif
- +
-
- Index: lib/shiftlower.c
- Prereq: 5.1
- *** ../elm2.4/lib/shiftlower.c Sat Oct 3 18:42:29 1992
- --- lib/shiftlower.c Tue Aug 3 15:28:57 1993
- ***************
- *** 1,7 ****
- ! static char rcsid[] = "@(#)$Id: shiftlower.c,v 5.1 1992/10/03 22:41:36 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.1 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,7 ----
- ! static char rcsid[] = "@(#)$Id: shiftlower.c,v 5.2 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 13,18 ****
- --- 13,30 ----
- *
- *******************************************************************************
- * $Log: shiftlower.c,v $
- + * Revision 5.2 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.1 1992/10/03 22:41:36 syd
- * Initial checkin as of 2.4 Release at PL0
- *
- ***************
- *** 25,37 ****
-
- #include "headers.h"
-
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef tolower
- - #undef toupper
- - #endif
- -
- char *shift_lower(string)
- char *string;
- {
- --- 37,42 ----
- ***************
- *** 42,51 ****
- register char *bufptr = buffer;
-
- for (; *string; string++, bufptr++)
- ! if (isupper(*string))
- ! *bufptr = tolower(*string);
- ! else
- ! *bufptr = *string;
-
- *bufptr = 0;
-
- --- 47,53 ----
- register char *bufptr = buffer;
-
- for (; *string; string++, bufptr++)
- ! *bufptr = tolower(*string);
-
- *bufptr = 0;
-
-
- Index: lib/strftime.c
- Prereq: 5.4
- *** ../elm2.4/lib/strftime.c Sat May 8 15:56:51 1993
- --- lib/strftime.c Sun Aug 22 22:46:56 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: strftime.c,v 5.4 1993/05/08 19:56:45 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Public-domain relatively quick-and-dirty implemenation of
- * ANSI library routine for System V Unix systems.
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: strftime.c,v 5.8 1993/08/23 02:46:51 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.8 $ $State: Exp $
- *
- * Public-domain relatively quick-and-dirty implemenation of
- * ANSI library routine for System V Unix systems.
- ***************
- *** 19,24 ****
- --- 19,52 ----
- *
- *******************************************************************************
- * $Log: strftime.c,v $
- + * Revision 5.8 1993/08/23 02:46:51 syd
- + * Test ANSI_C, not __STDC__ (which is not set on e.g. AIX).
- + * From: decwrl!uunet.UU.NET!fin!chip (Chip Salzenberg)
- + *
- + * Revision 5.7 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.6 1993/08/03 19:20:31 syd
- + * Implement new timezone handling. New file lib/get_tz.c with new timezone
- + * routines. Added new TZMINS_USE_xxxxxx and TZNAME_USE_xxxxxx configuration
- + * definitions. Obsoleted TZNAME, ALTCHECK, and TZ_MINUTESWEST configuration
- + * definitions. Updated Configure. Modified lib/getarpdate.c and
- + * lib/strftime.c to use new timezone routines.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.5 1993/06/10 03:17:45 syd
- + * Change from TZNAME_MISSING to TZNAME
- + * From: Syd via request from Dan Blanchard
- + *
- * Revision 5.4 1993/05/08 19:56:45 syd
- * update to newer version
- * From: Syd
- ***************
- *** 79,103 ****
- #ifdef I_SYSTIME
- # include <sys/time.h>
- #endif
- - #ifdef BSD
- - # include <sys/timeb.h>
- - #endif
-
- ! #include <ctype.h>
-
- ! #ifndef __STDC__
- ! #define const /**/
-
- #ifndef BSD
- ! extern void tzset();
- ! #endif
- ! static int weeknumber();
- ! #else /* __STDC__ */
- ! #ifndef BSD
- ! extern void tzset(void);
- #endif
- ! static int weeknumber(const struct tm *timeptr, int firstweekday);
- ! #endif
-
- /* defaults: season to taste */
- #define SYSV_EXT 1 /* stuff in System V ascftime routine */
- --- 107,126 ----
- #ifdef I_SYSTIME
- # include <sys/time.h>
- #endif
-
- ! #if ANSI_C
- ! # define P_(x) x
- ! #else
- ! # define P_(x) /**/
- ! # define const /**/
- ! #endif
-
- ! extern char *get_tz_name();
-
- #ifndef BSD
- ! extern void tzset P_((void));
- #endif
- ! static int weeknumber P_((const struct tm *timeptr, int firstweekday));
-
- /* defaults: season to taste */
- #define SYSV_EXT 1 /* stuff in System V ascftime routine */
- ***************
- *** 133,146 ****
-
- #define range(low, item, hi) maximum(low, minimum(item, hi))
-
- - #ifndef BSD
- - extern char *tzname[2];
- - extern int daylight;
- - #endif
- -
- /* minimum --- return minimum of two numbers */
-
- ! #ifndef __STDC__
- static inline int
- minimum(a, b)
- int a, b;
- --- 156,164 ----
-
- #define range(low, item, hi) maximum(low, minimum(item, hi))
-
- /* minimum --- return minimum of two numbers */
-
- ! #if !ANSI_C
- static inline int
- minimum(a, b)
- int a, b;
- ***************
- *** 154,160 ****
-
- /* maximum --- return maximum of two numbers */
-
- ! #ifndef __STDC__
- static inline int
- maximum(a, b)
- int a, b;
- --- 172,178 ----
-
- /* maximum --- return maximum of two numbers */
-
- ! #if !ANSI_C
- static inline int
- maximum(a, b)
- int a, b;
- ***************
- *** 168,174 ****
-
- /* strftime --- produce formatted time */
-
- ! #ifndef __STDC__
- size_t
- strftime(s, maxsize, format, timeptr)
- char *s;
- --- 186,192 ----
-
- /* strftime --- produce formatted time */
-
- ! #if !ANSI_C
- size_t
- strftime(s, maxsize, format, timeptr)
- char *s;
- ***************
- *** 394,411 ****
- break;
-
- case 'Z': /* time zone name or abbrevation */
- ! i = 0;
- ! if (
- ! #ifndef TZNAME_MISSING
- ! daylight &&
- ! #endif
- ! timeptr->tm_isdst)
- ! i = 1;
- ! #ifdef TZNAME_MISSING
- ! strcpy(tbuf, timeptr->tm_zone);
- ! #else
- ! strcpy(tbuf, tzname[i]);
- ! #endif
- break;
-
- #ifdef SYSV_EXT
- --- 412,418 ----
- break;
-
- case 'Z': /* time zone name or abbrevation */
- ! strcpy(tbuf, get_tz_name(timeptr));
- break;
-
- #ifdef SYSV_EXT
- ***************
- *** 528,534 ****
- #ifdef POSIX2_DATE
- /* iso8601wknum --- compute week number according to ISO 8601 */
-
- ! #ifndef __STDC__
- static int
- iso8601wknum(timeptr)
- const struct tm *timeptr;
- --- 535,541 ----
- #ifdef POSIX2_DATE
- /* iso8601wknum --- compute week number according to ISO 8601 */
-
- ! #if !ANSI_C
- static int
- iso8601wknum(timeptr)
- const struct tm *timeptr;
- ***************
- *** 590,596 ****
-
- /* With thanks and tip of the hatlo to ado@elsie.nci.nih.gov */
-
- ! #ifndef __STDC__
- static int
- weeknumber(timeptr, firstweekday)
- const struct tm *timeptr;
- --- 597,603 ----
-
- /* With thanks and tip of the hatlo to ado@elsie.nci.nih.gov */
-
- ! #if !ANSI_C
- static int
- weeknumber(timeptr, firstweekday)
- const struct tm *timeptr;
-
- Index: lib/strincmp.c
- Prereq: 5.1
- *** ../elm2.4/lib/strincmp.c Sat Oct 3 18:42:29 1992
- --- lib/strincmp.c Tue Aug 3 15:28:58 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: strincmp.c,v 5.1 1992/10/03 22:41:36 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.1 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: strincmp.c,v 5.2 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: strincmp.c,v $
- + * Revision 5.2 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.1 1992/10/03 22:41:36 syd
- * Initial checkin as of 2.4 Release at PL0
- *
- ***************
- *** 24,35 ****
- **/
-
- #include "headers.h"
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef tolower
- - #undef toupper
- - #endif
-
- int
- strincmp(s1,s2,n)
- --- 36,41 ----
- ***************
- *** 39,46 ****
- /* case insensitive comparison */
- register int d;
- while (--n >= 0) {
- ! d = ( isupper(*s1) ? tolower(*s1) : *s1 )
- ! - ( isupper(*s2) ? tolower(*s2) : *s2 ) ;
- if ( d != 0 || *s1 == '\0' || *s2 == '\0' )
- return d;
- ++s1;
- --- 45,51 ----
- /* case insensitive comparison */
- register int d;
- while (--n >= 0) {
- ! d = (tolower(*s1) - tolower(*s2));
- if ( d != 0 || *s1 == '\0' || *s2 == '\0' )
- return d;
- ++s1;
-
- Index: lib/striparens.c
- Prereq: 5.1
- *** ../elm2.4/lib/striparens.c Sat Oct 3 18:42:30 1992
- --- lib/striparens.c Wed Jun 9 23:09:06 1993
- ***************
- *** 1,7 ****
- ! static char rcsid[] = "@(#)$Id: striparens.c,v 5.1 1992/10/03 22:41:36 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.1 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,7 ----
- ! static char rcsid[] = "@(#)$Id: striparens.c,v 5.2 1993/06/10 03:09:06 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 13,134 ****
- *
- *******************************************************************************
- * $Log: striparens.c,v $
- * Revision 5.1 1992/10/03 22:41:36 syd
- * Initial checkin as of 2.4 Release at PL0
- *
- *
- ******************************************************************************/
-
- ! /**
- !
- ! **/
-
- #include "headers.h"
-
-
- ! char *strip_parens(string)
- ! char *string;
- {
- ! /**
- ! Remove parenthesized information from a string. More specifically,
- ! comments as defined in RFC822 are removed. This procedure is
- ! non-destructive - a pointer to static data is returned.
- ! **/
- ! static char buffer[VERY_LONG_STRING];
- ! register char *bufp;
- ! register int depth, l;
- !
- ! bufp = buffer;
- ! depth = 0;
- ! while (*string != '\0') {
- ! l = len_next_part(string);
- ! if (l == 1) {
- ! switch ( *string ) {
- ! case '(': /* begin comment on '(' */
- ! ++depth;
- ! break;
- ! case ')': /* decr nesting level on ')' */
- ! --depth;
- ! break;
- ! case '\\': /* treat next char literally */
- ! if ( *++string == '\0' ) { /* gracefully handle */
- ! *bufp++ = '\\'; /* '\' at end of string */
- ! --string; /* even tho it's wrong */
- ! } else if ( depth == 0 ) {
- ! *bufp++ = '\\';
- ! *bufp++ = *string;
- ! }
- ! break;
- ! default: /* a regular char */
- ! if ( depth == 0 )
- ! *bufp++ = *string;
- ! break;
- ! }
- ! string++;
- ! } else {
- ! if (depth == 0) {
- ! while (--l >= 0)
- ! *bufp++ = *string++;
- ! } else
- ! string += l;
- ! }
- }
- ! *bufp = '\0';
- ! return( (char *) buffer);
- }
-
- ! /*
- ! * Added by RLH. This could be combined w/ above if willing to pass
- ! * a TRUE/FALSE for whether we are stripping or getting...
- ! */
- ! char *get_parens(string)
- ! char *string;
- {
- ! /**
- ! Find and return parenthesized information in a string. More
- ! specifically, comments as defined in RFC822 are retrieved.
- ! This procedure is non-destructive - a pointer to static data
- ! is returned.
- ! **/
- ! static char buffer[VERY_LONG_STRING];
- ! register char *bufp;
- ! register int depth, l;
- !
- ! bufp = buffer;
- ! depth = 0;
- ! while (*string != '\0') {
- ! l = len_next_part(string);
- ! if (l == 1) {
- ! switch ( *string ) {
- ! case '(': /* begin comment on '(' */
- ! ++depth;
- ! break;
- ! case ')': /* decr nesting level on ')' */
- ! --depth;
- ! break;
- ! case '\\': /* treat next char literally */
- ! if ( *++string == '\0' ) { /* gracefully handle */
- ! *bufp++ = '\\'; /* '\' at end of string */
- ! --string; /* even tho it's wrong */
- ! } else if ( depth > 0 ) {
- ! *bufp++ = '\\';
- ! *bufp++ = *string;
- ! }
- ! break;
- ! default: /* a regular char */
- ! if ( depth > 0 )
- ! *bufp++ = *string;
- ! break;
- ! }
- ! string++;
- ! } else {
- ! if (depth > 0) {
- ! while (--l >= 0)
- ! *bufp++ = *string++;
- ! } else
- ! string += l;
- ! }
- }
- ! *bufp = '\0';
- ! return( (char *) buffer);
- }
- --- 13,89 ----
- *
- *******************************************************************************
- * $Log: striparens.c,v $
- + * Revision 5.2 1993/06/10 03:09:06 syd
- + * Greatly simplified "lib/striparens.c" to use new rfc822_toklen() routine.
- + * This cut more than 50% out of the object size. Also added _TEST case.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.1 1992/10/03 22:41:36 syd
- * Initial checkin as of 2.4 Release at PL0
- *
- *
- ******************************************************************************/
-
- ! /*
- ! * strip_parens() - Delete all (parenthesized) information from a string.
- ! * get_parens() - Extract all (parenthesized) information from a string.
- ! *
- ! * These routines handle RFC-822 comments. Nested parens are understood.
- ! * get_parens() does not include the parens in the return result. Both
- ! * routines are non-destructive. They return a pointer to static data
- ! * that will be overwritten on the next call to either routine.
- ! */
-
- #include "headers.h"
-
- + static char paren_buffer[VERY_LONG_STRING];
-
- ! char *strip_parens(src)
- ! register char *src;
- {
- ! register int len;
- ! register char *dest = paren_buffer;
- !
- ! while (*src != '\0') {
- ! len = rfc822_toklen(src);
- ! if (*src != '(') { /*)*/
- ! strncpy(dest, src, len);
- ! dest += len;
- ! }
- ! src += len;
- }
- ! *dest = '\0';
- ! return paren_buffer;
- }
-
- ! char *get_parens(src)
- ! register char *src;
- {
- ! register int len;
- ! register char *dest = paren_buffer;
- !
- ! while (*src != '\0') {
- ! len = rfc822_toklen(src);
- ! if (len > 2 && *src == '(') { /*)*/
- ! strncpy(dest, src+1, len-2);
- ! dest += (len-2);
- ! }
- ! src += len;
- ! }
- ! *dest = '\0';
- ! return paren_buffer;
- ! }
- !
- ! #ifdef _TEST
- ! main()
- ! {
- ! char buf[1024];
- ! while (fputs("\nstr> ", stdout), gets(buf) != NULL) {
- ! printf("strip_parens() |%s|\n", strip_parens(buf));
- ! printf("get_parens() |%s|\n", get_parens(buf));
- }
- ! putchar('\n');
- ! exit(0);
- }
- + #endif
- +
-
- Index: lib/strtokq.c
- Prereq: 5.2
- *** ../elm2.4/lib/strtokq.c Wed Feb 3 11:20:33 1993
- --- lib/strtokq.c Mon Jul 19 22:05:17 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: strtokq.c,v 5.2 1993/02/03 16:20:30 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: strtokq.c,v 5.3 1993/07/20 02:05:17 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.3 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,35 ----
- *
- *******************************************************************************
- * $Log: strtokq.c,v $
- + * Revision 5.3 1993/07/20 02:05:17 syd
- + * A long-standing bug of handling replies to VMS systems.
- + * Original "From: " -line is of format:
- + * From: "NAME \"Real Name\"" <USERNAME@vms-system>
- + * (PMDF mailer)
- + * Anyway, parse_arpa_who() strips quotes too cleanly
- + * resulting data:
- + * NAME \"Real Name\
- + * which, when put into parenthesis, becomes:
- + * (NAME \"Real Name\)
- + * which in its turn lacks closing `)'
- + * Patch of lib/parsarpwho.c fixes that.
- + * strtokq() started one position too late to search for next double-quote (") char.
- + * Another one-off (chops off trailing comment character, quote or not..) in src/reply.c
- + * From: Matti Aarnio <mea@utu.fi>
- + *
- * Revision 5.2 1993/02/03 16:20:30 syd
- * add include file
- *
- ***************
- *** 54,60 ****
- register char *sp;
- char quote = *sourceptr++;
-
- ! for (sp = sourceptr+1; *sp != '\0' && *sp != quote; sp++)
- if (*sp == '\\') sp++; /* skip escaped characters */
- /* expand_macros will fix them later */
-
- --- 70,76 ----
- register char *sp;
- char quote = *sourceptr++;
-
- ! for (sp = sourceptr; *sp != '\0' && *sp != quote; sp++)
- if (*sp == '\\') sp++; /* skip escaped characters */
- /* expand_macros will fix them later */
-
-
- Index: nls/C/C/C/s_aliases.m
- *** ../elm2.4/nls/C/C/C/s_aliases.m Sat May 8 13:03:49 1993
- --- nls/C/C/C/s_aliases.m Sat Jun 12 01:26:18 1993
- ***************
- *** 31,37 ****
- $ #MenuLn3
- 16 l)imit display, m)ail, n)ew alias, r)eturn, t)ag, u)ndelete, or e(x)it
- $ #Sort
- ! 17 Sorting messages by %s...
- $ group and person must both be 6 characters long
- $ #Group
- 18 " Group"
- --- 31,37 ----
- $ #MenuLn3
- 16 l)imit display, m)ail, n)ew alias, r)eturn, t)ag, u)ndelete, or e(x)it
- $ #Sort
- ! 17 Sorting aliases by %s...
- $ group and person must both be 6 characters long
- $ #Group
- 18 " Group"
-
- Index: nls/C/C/C/s_answer.m
- *** ../elm2.4/nls/C/C/C/s_answer.m Tue Jan 19 22:36:05 1993
- --- nls/C/C/C/s_answer.m Tue Aug 10 14:53:57 1993
- ***************
- *** 38,44 ****
- $ #EnterMessage
- 18 \n\nEnter message for %s ending with a blank line.\n\n
- $ #ElmCommand
- ! 19 ((%s -s "While You Were Out" %s ; %s %s) & ) < %s > /dev/null
- $ #CannotHaveMoreNames
- 20 ** Can't have more than 'FirstName LastName' as address!\n
- $ #NotFoundForGroup
- --- 38,44 ----
- $ #EnterMessage
- 18 \n\nEnter message for %s ending with a blank line.\n\n
- $ #ElmCommand
- ! 19 ( ( %s -s "While You Were Out" %s < %s ; %s %s) & ) > /dev/null
- $ #CannotHaveMoreNames
- 20 ** Can't have more than 'FirstName LastName' as address!\n
- $ #NotFoundForGroup
-
- Index: nls/C/C/C/s_elm.m
- *** ../elm2.4/nls/C/C/C/s_elm.m Mon May 31 15:34:49 1993
- --- nls/C/C/C/s_elm.m Tue Aug 3 14:58:06 1993
- ***************
- *** 1000,1010 ****
- --- 1000,1012 ----
- \t -dn\t\tDebug - set debug level to 'n'\n\r\
- \t -fx\t\tFolder - read folder 'x' rather than incoming mailbox\n\r\
- \t -h \t\tHelp - give this list of options\n\r\
- + \t -ix\t\tInclude prepared file 'x' in edit buffer for send\n\r\
- \t -k \t\tKeypad - enable HP 2622 terminal keyboard\n\r
- $ #ArgsHelp2
- 536 \t -K \t\tKeypad&softkeys - enable use of softkeys + "-k"\n\r\
- \t -m \t\tMenu - Turn off menu, using more of the screen\n\r\
- \t -sx\t\tSubject 'x' - for batch mailing\n\r\
- + \t -t \t\tTiTe - don't use termcap/terminfo ti/te entries.\n\r\
- \t -V \t\tEnable sendmail voyeur mode.\n\r\
- \t -v \t\tPrint out ELM version information.\n\r\
- \t -z \t\tZero - don't enter ELM if no mail is pending\n\r\
- ***************
- *** 1066,1073 ****
- 564 Too many weed headers! Out of memory! Leaving...\n\r
- $ #NoMemDefaultWeed
- 565 \nNot enough memory for default weedlist. Leaving.\n
- ! $ #CantExpandEnvVar
- ! 566 \n\rCan't expand environment variable '%s'.\n\r
- $ #CouldntMakeTempFileName
- 567 Sorry - couldn't make file temp file name.
- $ #CouldntOpenForWriting
- --- 1068,1075 ----
- 564 Too many weed headers! Out of memory! Leaving...\n\r
- $ #NoMemDefaultWeed
- 565 \nNot enough memory for default weedlist. Leaving.\n
- ! $ #CannotInitErrorExpanding
- ! 566 \r\nCannot initialize "%s" - error expanding "%s".\r\n
- $ #CouldntMakeTempFileName
- 567 Sorry - couldn't make file temp file name.
- $ #CouldntOpenForWriting
-
- Index: nls/C/C/C/s_elmalias.m
- *** ../elm2.4/nls/C/C/C/s_elmalias.m Sun Apr 11 22:10:16 1993
- --- nls/C/C/C/s_elmalias.m Tue Aug 10 14:54:55 1993
- ***************
- *** 1,6 ****
- $set 4 #Elmalias
- $ #Usage
- ! 1 usage: %s [-aenrsuvV] [-f format] [alias ...]\n
- $ #OutOfMemory
- 2 %s: out of memory [could not allocate %d bytes]\n
- $ #CannotSpecifyExpand
- --- 1,6 ----
- $set 4 #Elmalias
- $ #Usage
- ! 1 usage: %s [-adenrsuvV] [-f format] [alias ...]\n
- $ #OutOfMemory
- 2 %s: out of memory [could not allocate %d bytes]\n
- $ #CannotSpecifyExpand
-
- Index: nls/C/C/C/s_filter.m
- *** ../elm2.4/nls/C/C/C/s_filter.m Mon Feb 8 13:35:25 1993
- --- nls/C/C/C/s_filter.m Tue Aug 3 15:07:36 1993
- ***************
- *** 29,35 ****
- $ #EndMesg
- 14 \n-- End of filtered message --\n
- $ #CouldntCreateLockFile
- ! 15 filter (%s): Couldn't create lock file %s\n
- $ #CantOpenMailBox
- 16 filter (%s): Can't open mailbox %s!\n
- $ #SavedMessage
- --- 29,35 ----
- $ #EndMesg
- 14 \n-- End of filtered message --\n
- $ #CouldntCreateLockFile
- ! 15 filter (%s): Couldn't create lock file\n
- $ #CantOpenMailBox
- 16 filter (%s): Can't open mailbox %s!\n
- $ #SavedMessage
-
- Index: nls/gencat/dumpmsg.c
- *** ../elm2.4/nls/gencat/dumpmsg.c Tue Oct 1 11:42:21 1991
- --- nls/gencat/dumpmsg.c Sun Aug 22 22:46:29 1993
- ***************
- *** 57,63 ****
- }
-
- void main(
- ! #if defined(__STDC__) || defined(__cplusplus)
- int argc, char *argv[])
- #else
- argc, argv)
- --- 57,63 ----
- }
-
- void main(
- ! #if ANSI_C || defined(__cplusplus)
- int argc, char *argv[])
- #else
- argc, argv)
-
- Index: nls/gencat/gencat.c
- *** ../elm2.4/nls/gencat/gencat.c Tue Jun 30 20:56:49 1992
- --- nls/gencat/gencat.c Sun Aug 22 22:46:29 1993
- ***************
- *** 65,82 ****
- * will be in C syntax, in bar.H in C++ syntax.
- */
-
- ! static void writeIfChanged(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! char *fname, int lang, int orConsts
- #endif
- ! );
-
- void usage() {
- ! fprintf(stderr, "Use: gencat [-new] [-or] [-lang C|C++|ANSIC] catfile msgfile [-h <header-file>]...\n");
- }
-
- void main(
- ! #if defined(__STDC__) || defined(__cplusplus)
- int argc, char *argv[])
- #else
- argc, argv)
- --- 65,87 ----
- * will be in C syntax, in bar.H in C++ syntax.
- */
-
- ! #if ANSI_C || defined(__cplusplus)
- ! # define P_(x) x
- ! #else
- ! # define P_(x) /**/
- #endif
- !
- ! static void writeIfChanged P_((char *fname, int lang, int orConsts));
- !
- ! #undef P_
-
- void usage() {
- ! fprintf(stderr, "Use: gencat [-new] [-or] [-lang C|C++|ANSIC]\n");
- ! fprintf(stderr, " catfile msgfile [-h <header-file>]...\n");
- }
-
- void main(
- ! #if ANSI_C || defined(__cplusplus)
- int argc, char *argv[])
- #else
- argc, argv)
- ***************
- *** 164,170 ****
- }
-
- static void writeIfChanged(
- ! #if defined(__STDC__) || defined(__cplusplus)
- char *fname, int lang, int orConsts)
- #else
- fname, lang, orConsts)
- --- 169,175 ----
- }
-
- static void writeIfChanged(
- ! #if ANSI_C || defined(__cplusplus)
- char *fname, int lang, int orConsts)
- #else
- fname, lang, orConsts)
-
- Index: nls/gencat/gencat.h
- *** ../elm2.4/nls/gencat/gencat.h Mon Sep 23 15:47:46 1991
- --- nls/gencat/gencat.h Sun Aug 22 22:46:29 1993
- ***************
- *** 79,125 ****
-
- #define MAXTOKEN 1024
-
- ! extern void MCAddSet(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int setId, char *c
- #endif
- ! );
- ! extern void MCDelSet(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int setId
- ! #endif
- ! );
- ! extern void MCAddMsg(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int msgId, char *msg, char *c
- ! #endif
- ! );
- ! extern void MCDelMsg(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int msgId
- ! #endif
- ! );
- ! extern void MCParse(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int fd
- ! #endif
- ! );
- ! extern void MCReadCat(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int fd
- ! #endif
- ! );
- ! extern void MCWriteConst(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int fd, int type, int orConsts
- ! #endif
- ! );
- ! extern void MCWriteCat(
- ! #if defined(__STDC__) || defined(__cplusplus)
- ! int fd
- #endif
- ! );
- ! extern long MCGetByteOrder();
-
- #ifndef True
- # define True ~0
- --- 79,103 ----
-
- #define MAXTOKEN 1024
-
- ! #if !defined(ANSI_C) && (defined(__STDC__) || defined(_AIX))
- ! # define ANSI_C 1
- #endif
- !
- ! #if ANSI_C || defined(__cplusplus)
- ! # define P_(x) x
- ! #else
- ! # define P_(x) /**/
- #endif
- !
- ! extern void MCAddSet P_((int setId, char *c));
- ! extern void MCDelSet P_((int setId));
- ! extern void MCAddMsg P_((int msgId, char *msg, char *c));
- ! extern void MCDelMsg P_((int msgId));
- ! extern void MCParse P_((int fd));
- ! extern void MCReadCat P_((int fd));
- ! extern void MCWriteConst P_((int fd, int type, int orConsts));
- ! extern void MCWriteCat P_((int fd));
- ! extern long MCGetByteOrder P_((void));
-
- #ifndef True
- # define True ~0
-
- Index: src/a_sort.c
- Prereq: 5.4
- *** ../elm2.4/src/a_sort.c Sun Apr 11 21:10:15 1993
- --- src/a_sort.c Sat Jun 12 01:27:55 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: a_sort.c,v 5.4 1993/04/12 01:10:15 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: a_sort.c,v 5.5 1993/06/12 05:27:44 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.5 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,23 ----
- *
- *******************************************************************************
- * $Log: a_sort.c,v $
- + * Revision 5.5 1993/06/12 05:27:44 syd
- + * Fix calling sequence error
- + * From: Syd
- + *
- * Revision 5.4 1993/04/12 01:10:15 syd
- * fix @aliasname sort problem
- * From: "Robert L. Howard" <robert.howard@matd.gatech.edu>
- ***************
- *** 75,81 ****
-
- if ((entries > 30) && visible && are_in_aliases) {
- error1(catgets(elm_msg_cat, AliasesSet, AliasesSort,
- ! "Sorting messages by %s..."), alias_sort_name(FULL));
- }
-
- if (entries > 1)
- --- 79,85 ----
-
- if ((entries > 30) && visible && are_in_aliases) {
- error1(catgets(elm_msg_cat, AliasesSet, AliasesSort,
- ! "Sorting aliases by %s..."), alias_sort_name(FULL));
- }
-
- if (entries > 1)
-
- Index: src/addr_util.c
- Prereq: 5.10
- *** ../elm2.4/src/addr_util.c Mon May 31 15:32:21 1993
- --- src/addr_util.c Tue Aug 3 15:28:59 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: addr_util.c,v 5.10 1993/05/31 19:32:20 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.10 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: addr_util.c,v 5.11 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.11 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: addr_util.c,v $
- + * Revision 5.11 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.10 1993/05/31 19:32:20 syd
- * With this patch build_address() should treat local mailing
- * lists and other aliases known by the transport agent as valid
- ***************
- *** 80,92 ****
- #include "headers.h"
- #include "s_elm.h"
-
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef tolower
- - #undef toupper
- - #endif
- -
-
- translate_return(addr, ret_addr)
- char *addr, *ret_addr;
- --- 92,97 ----
-
- Index: src/alias.c
- Prereq: 5.34
- *** ../elm2.4/src/alias.c Thu May 13 23:57:37 1993
- --- src/alias.c Tue Aug 3 15:29:00 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: alias.c,v 5.34 1993/05/14 03:57:36 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.34 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: alias.c,v 5.37 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.37 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,42 ----
- *
- *******************************************************************************
- * $Log: alias.c,v $
- + * Revision 5.37 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.36 1993/06/12 05:27:44 syd
- + * Fix calling sequence error
- + * From: Syd
- + *
- + * Revision 5.35 1993/06/10 02:58:26 syd
- + * Correct problem in fetch_alias() with alias record fixup that caused
- + * core dump on machines with pointers larger than int. This problem
- + * was reported on comp.mail.elm by Richard Eckman and Jim Brown. Simplify
- + * get_one_alias() by having it use fetch_alias().
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.34 1993/05/14 03:57:36 syd
- * A couple of calls to want_to() had typos. Here is the patch.
- * From: Jukka Ukkonen <ukkonen@csc.fi>
- ***************
- *** 230,244 ****
- #include "headers.h"
- #include "s_elm.h"
- #include <errno.h>
- - #include <ctype.h>
- #include <sys/stat.h>
- #include "s_aliases.h"
- #include "ndbz.h"
-
- - #ifdef BSD
- - #undef tolower
- - #endif
- -
- #define ECHOIT 1 /* echo on for prompting */
-
- /*
- --- 253,262 ----
- ***************
- *** 984,990 ****
-
- main_state(); /* Save globals for return to main menu */
-
- ! open_alias_files(); /* First, read the alias files. RLH */
-
- alias_screen(newaliases);
- define_softkeys(ALIAS);
- --- 1002,1008 ----
-
- main_state(); /* Save globals for return to main menu */
-
- ! open_alias_files(FALSE); /* First, read the alias files. RLH */
-
- alias_screen(newaliases);
- define_softkeys(ALIAS);
- ***************
- *** 1305,1311 ****
- "Processed %d aliases. Re-reading the database..."), na);
- if (sleepmsg > 0)
- sleep(sleepmsg);
- ! open_alias_files();
- set_error(catgets(elm_msg_cat, AliasesSet, AliasesUpdatedOK,
- "Aliases updated successfully."));
- }
- --- 1323,1329 ----
- "Processed %d aliases. Re-reading the database..."), na);
- if (sleepmsg > 0)
- sleep(sleepmsg);
- ! open_alias_files(TRUE);
- set_error(catgets(elm_msg_cat, AliasesSet, AliasesUpdatedOK,
- "Aliases updated successfully."));
- }
- ***************
- *** 1537,1610 ****
- * Get an alias (name, address, etc.) from the data file
- */
-
- ! long new_max;
- ! register struct alias_rec **new_aliases, *a;
- ! struct alias_rec ar;
- ! FILE *data_file = db->dbz_basef;
-
- ! if(read_one_alias(db, &ar) == 0) {
- ! return(0);
- ! }
-
- if (current >= max_aliases) {
- new_max = max_aliases + KLICK;
- ! if (max_aliases == 0)
- ! new_aliases = (struct alias_rec **)
- ! malloc(new_max * sizeof(struct alias_rec *));
- ! else
- ! new_aliases = (struct alias_rec **)
- ! realloc((char *) aliases,
- ! new_max * sizeof(struct alias_rec *));
- !
- ! if (new_aliases == NULL) {
- ! error1(catgets(elm_msg_cat, AliasesSet, AliasesErrorMemory,
- ! "\n\r\n\rCouldn't allocate enough memory! Alias #%d.\n\r\n\r"),
- ! current);
- ! return(0);
- }
- - aliases = new_aliases;
- while (max_aliases < new_max)
- aliases[max_aliases++] = NULL;
- }
-
- !
- ! if (aliases[current] != NULL) {
- ! free((char *) aliases[current]);
- ! aliases[current] = NULL;
- ! }
- !
- ! if ((a = (struct alias_rec *)
- ! malloc(sizeof(ar) + ar.length)) == NULL) {
- ! error1(catgets(elm_msg_cat, AliasesSet, AliasesErrorMemory,
- ! "\n\r\n\rCouldn't allocate enough memory! Alias #%d.\n\r\n\r"),
- ! current);
- ! return(0);
- ! }
- !
- aliases[current] = a;
- ! fread((char *) (a + 1), ar.length, 1, data_file);
- ! *a = ar;
- ! #ifdef CRAY
- ! a->alias = (int) a->alias + (char *) (a + 1);
- ! a->last_name = (int) a->last_name + (char *) (a + 1);
- ! a->name = (int) a->name + (char *) (a + 1);
- ! a->comment = (int) a->comment + (char *) (a + 1);
- ! a->address = (int) a->address + (char *) (a + 1);
- ! #else
- ! new_max = (long) (a + 1);
- !
- ! a->alias += new_max;
- ! a->last_name += new_max;
- ! a->name += new_max;
- ! a->comment += new_max;
- ! a->address += new_max;
- ! #endif
- ! a->length = current;
- !
- !
- ! return(1);
- }
-
- main_state()
- {
- /* Save the globals that are shared for both menus
- --- 1555,1587 ----
- * Get an alias (name, address, etc.) from the data file
- */
-
- ! int new_max;
- ! register struct alias_rec *a;
- ! extern struct alias_rec *fetch_alias();
-
- ! if ((a = fetch_alias(db, (char *)NULL)) == NULL)
- ! return 0;
-
- if (current >= max_aliases) {
- new_max = max_aliases + KLICK;
- ! if (max_aliases == 0) {
- ! aliases = (struct alias_rec **)
- ! safe_malloc(new_max * sizeof(struct alias_rec *));
- ! } else {
- ! aliases = (struct alias_rec **) safe_realloc((malloc_t)aliases,
- ! new_max * sizeof(struct alias_rec *));
- }
- while (max_aliases < new_max)
- aliases[max_aliases++] = NULL;
- }
-
- ! if (aliases[current] != NULL)
- ! free((malloc_t)aliases[current]);
- aliases[current] = a;
- ! return 1;
- }
-
- +
- main_state()
- {
- /* Save the globals that are shared for both menus
-
- Index: src/aliaslib.c
- Prereq: 5.9
- *** ../elm2.4/src/aliaslib.c Mon May 31 15:39:44 1993
- --- src/aliaslib.c Tue Aug 3 15:29:01 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 5.9 1993/05/31 19:39:43 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.9 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 5.10 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.10 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: aliaslib.c,v $
- + * Revision 5.10 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.9 1993/05/31 19:39:43 syd
- * Elm either failed to expand a group alias or crashed in strlen
- * (called from do_expand_group()).
- ***************
- *** 70,76 ****
-
- #include "headers.h"
- #include "s_elm.h"
- - #include <ctype.h>
-
- char *get_alias_address(), *qstrpbrk();
- extern int current_mail_message;
- --- 82,87 ----
-
- Index: src/builtin.c
- Prereq: 5.1
- *** ../elm2.4/src/builtin.c Sat Oct 3 18:58:47 1992
- --- src/builtin.c Tue Aug 3 15:29:01 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: builtin.c,v 5.1 1992/10/03 22:58:40 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.1 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: builtin.c,v 5.2 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: builtin.c,v $
- + * Revision 5.2 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.1 1992/10/03 22:58:40 syd
- * Initial checkin as of 2.4 Release at PL0
- *
- ***************
- *** 32,38 ****
-
- #include "headers.h"
- #include "s_elm.h"
- - #include <ctype.h>
-
- #define BEEP 007 /* ASCII Bell character */
-
- --- 44,49 ----
-
- Index: src/curses.c
- Prereq: 5.10
- *** ../elm2.4/src/curses.c Sun Apr 11 23:57:46 1993
- --- src/curses.c Sun Aug 22 22:56:36 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: curses.c,v 5.10 1993/04/12 03:57:45 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.10 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: curses.c,v 5.13 1993/08/23 02:56:35 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.13 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,42 ----
- *
- *******************************************************************************
- * $Log: curses.c,v $
- + * Revision 5.13 1993/08/23 02:56:35 syd
- + * have Writechar() backspace over the left edge of the screen to the end
- + * of the previous line if the current line is not the first line on the
- + * screen.
- + * From: Jukka Ukkonen <ukkonen@csc.fi>
- + *
- + * Revision 5.12 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.11 1993/07/20 02:13:20 syd
- + * Make tabspacing check for <= 0 so we dont get divide by
- + * zero errors when the termcap has tabspacing 0
- + * From: Syd via request from G A Smant
- + *
- * Revision 5.10 1993/04/12 03:57:45 syd
- * Give up and add an Ultrix specific patch. There is a bug in Ispell under
- * ultrix. The problem is that when ispell returns, the terminal is no
- ***************
- *** 90,106 ****
- # endif
- #endif
-
- - #include <ctype.h>
- -
- #ifdef PTEM
- # include <sys/stream.h>
- # include <sys/ptem.h>
- #endif
-
- - #ifdef BSD
- - #undef tolower
- - #endif
- -
- #define TTYIN 0
-
- #ifdef SHORTNAMES
- --- 113,123 ----
- ***************
- *** 202,208 ****
- _cleartoeos = tgetstr("cd", &ptr);
- _lines = tgetnum("li");
- _columns = tgetnum("co");
- ! tabspacing = ((tabspacing=tgetnum("it"))==-1 ? 8 : tabspacing);
- _automargin = tgetflag("am");
- _eatnewlineglitch = tgetflag("xn");
- _transmit_on = tgetstr("ks", &ptr);
- --- 219,225 ----
- _cleartoeos = tgetstr("cd", &ptr);
- _lines = tgetnum("li");
- _columns = tgetnum("co");
- ! tabspacing = ((tabspacing=tgetnum("it"))<= 0 ? 8 : tabspacing);
- _automargin = tgetflag("am");
- _eatnewlineglitch = tgetflag("xn");
- _transmit_on = tgetstr("ks", &ptr);
- ***************
- *** 706,715 ****
-
- /* if backspace, move back one space if not already in column 0 */
- else if (ch == BACKSPACE) {
- ! if(_col != 0) {
- ! tputs(_left, 1, outchar);
- ! _col--;
- ! } /* else BACKSPACE does nothing */
- }
-
- /* if bell, ring the bell but don't advance the column */
- --- 723,738 ----
-
- /* if backspace, move back one space if not already in column 0 */
- else if (ch == BACKSPACE) {
- ! if (_col != 0) {
- ! tputs(_left, 1, outchar);
- ! _col--;
- ! }
- ! else if (_line > 0) {
- ! _col = COLUMNS - 1;
- ! _line--;
- ! moveabsolute (_col, _line);
- ! }
- ! /* else BACKSPACE does nothing */
- }
-
- /* if bell, ring the bell but don't advance the column */
-
- Index: src/date.c
- Prereq: 5.4
- *** ../elm2.4/src/date.c Thu Dec 10 20:45:32 1992
- --- src/date.c Tue Aug 3 15:29:03 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: date.c,v 5.4 1992/12/11 01:45:04 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: date.c,v 5.5 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.5 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: date.c,v $
- + * Revision 5.5 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.4 1992/12/11 01:45:04 syd
- * remove sys/types.h include, it is now included by defs.h
- * and this routine includes defs.h or indirectly includes defs.h
- ***************
- *** 49,65 ****
- # include <sys/timeb.h>
- #endif
-
- - #include <ctype.h>
- -
- #ifndef _POSIX_SOURCE
- extern struct tm *localtime();
- extern struct tm *gmtime();
- extern time_t time();
- #endif
- -
- - #ifdef BSD
- - #undef tolower
- - #endif
-
- #define MONTHS_IN_YEAR 11 /* 0-11 equals 12 months! */
- #define FEB 1 /* 0 = January */
- --- 61,71 ----
-
- Index: src/editmsg.c
- Prereq: 5.12
- *** ../elm2.4/src/editmsg.c Sat May 8 16:25:38 1993
- --- src/editmsg.c Sun Aug 22 23:26:46 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: editmsg.c,v 5.12 1993/05/08 20:25:33 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.12 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: editmsg.c,v 5.18 1993/08/23 03:26:24 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.18 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,82 ----
- *
- *******************************************************************************
- * $Log: editmsg.c,v $
- + * Revision 5.18 1993/08/23 03:26:24 syd
- + * Try setting group id separate from user id in chown to
- + * allow restricted systems to change group id of file
- + * From: Syd
- + *
- + * Revision 5.17 1993/08/23 02:55:38 syd
- + * Fix problem where deleting to previous line caused duplication due to the
- + * file being opened for append (in append mode, all writes are to the end of
- + * file regardless of the file pointer).
- + * From: pdc@lunch.asd.sgi.com (Paul Close)
- + *
- + * Revision 5.16 1993/08/03 20:12:46 syd
- + * Fix signal type for 386bsd
- + * From: Scott Mace <smace@freefall.cdrom.com>
- + *
- + * Revision 5.15 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.14 1993/07/20 02:41:24 syd
- + * Three changes to expand_env() in src/read_rc.c: make it non-destructive,
- + * have it return an error code instead of bailing out, and add a buffer
- + * size argument to avoid overwritting the destination. The first is to
- + * avoid all of the gymnastics Elm needed to go through (and occasionally
- + * forgot to go through) to protect the value handed to expand_env().
- + * The second is because expand_env() was originally written to support
- + * "elmrc" and bailing out was a reasonable thing to do there -- but not
- + * in the other places where it has since been used. The third is just
- + * a matter of practicing safe source code.
- + *
- + * This patch changes all invocations to expand_env() to eliminate making
- + * temporary copies (now that the routine is non-destructive) and to pass
- + * in a destination length. Since expand_env() no longer bails out on
- + * error, a do_expand_env() routine was added to src/read_rc.c handle
- + * this. Moreover, the error message now gives some indication of what
- + * the problem is rather than just saying "can't expand".
- + *
- + * Gratitous change to src/editmsg.c renaming filename variables to
- + * clarify the purpose.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.13 1993/06/10 03:07:39 syd
- + * This fixes a bug in the MIME code. Include_Part() uses expand_env()
- + * to expand the include file name, but since expand_env() is destructive
- + * [it uses strtok()] the file name gets corrupted, and the "Content-Name"
- + * header can contain a bogus value. The easy fix would be a one-line
- + * hack to Include_Part to use a temporary buffer. This patch does not
- + * implement the easy fix. *Every* place expand_env() is used, its side
- + * effects cause problems. I think the right fix is to make expand_env()
- + * non-destructive (i.e. have it duplicate the input to a temporary buffer
- + * and work from there). The attached patch modifies expand_env() in
- + * that manner, and eliminates all of the `copy to a temporary buffer'
- + * calls that precede it throughout elm.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.12 1993/05/08 20:25:33 syd
- * Add sleepmsg to control transient message delays
- * From: Syd
- ***************
- *** 81,89 ****
- /* BSD has already included setjmp.h in headers.h */
- #include <setjmp.h>
- #endif /* BSD */
- - #include <ctype.h>
-
- ! #ifdef POSIX_SIGNALS
- # define JMP_BUF sigjmp_buf
- # define SETJMP(env) sigsetjmp((env), 1)
- # define LONGJMP(env,val) siglongjmp((env), (val))
- --- 144,151 ----
- /* BSD has already included setjmp.h in headers.h */
- #include <setjmp.h>
- #endif /* BSD */
-
- ! #if defined(POSIX_SIGNALS) && !defined(__386BSD__)
- # define JMP_BUF sigjmp_buf
- # define SETJMP(env) sigsetjmp((env), 1)
- # define LONGJMP(env,val) siglongjmp((env), (val))
- ***************
- *** 93,102 ****
- # define LONGJMP(env,val) longjmp((env), (val))
- #endif
-
- - #ifdef BSD
- - #undef tolower
- - #endif
- -
- char *error_description(), *format_long(), *strip_commas();
- long fsize();
-
- --- 155,160 ----
- ***************
- *** 202,228 ****
- of lines and characters we added, if any... **/
-
- FILE *myfd;
- ! char myfname[SLEN], buffer[SLEN];
- register int n;
- register int lines = 0, nchars = 0;
-
- ! for ( n = 0 ; whitespace(filename[n]) ; n++ );
-
- ! /** expand any shell variables, '~' or other notation... **/
- ! /* temp copy of filename to buffer since expand_env is destructive */
- ! strcpy(buffer, &filename[n]);
- ! expand_env(myfname, buffer);
-
- ! if (strlen(myfname) == 0) {
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmNoFilenameSpecified,
- "\n\r(No filename specified for file read! Continue.)\n\r"), 0);
- return;
- }
-
- ! if ((myfd = fopen(myfname,"r")) == NULL) {
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntReadFile,
- ! "\n\r(Couldn't read file '%s'! Continue.)\n\r"), 1,
- ! myfname);
- return;
- }
-
- --- 260,284 ----
- of lines and characters we added, if any... **/
-
- FILE *myfd;
- ! char exp_fname[SLEN], buffer[SLEN];
- register int n;
- register int lines = 0, nchars = 0;
-
- ! while (whitespace(*filename))
- ! ++filename;
-
- ! /** expand any shell variables or leading '~' **/
- ! (void) expand_env(exp_fname, filename, sizeof(exp_fname));
-
- ! if (exp_fname[0] == '\0') {
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmNoFilenameSpecified,
- "\n\r(No filename specified for file read! Continue.)\n\r"), 0);
- return;
- }
-
- ! if ((myfd = fopen(exp_fname,"r")) == NULL) {
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntReadFile,
- ! "\n\r(Couldn't read file '%s'! Continue.)\n\r"), 1, exp_fname);
- return;
- }
-
- ***************
- *** 251,257 ****
-
- if (show_user_filename)
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmAddedFromFile,
- ! "from file %s. Continue.)\n\r"), 1, myfname);
- else
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmAddedToMessage,
- "to message. Continue.)\n\r"), 0);
- --- 307,313 ----
-
- if (show_user_filename)
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmAddedFromFile,
- ! "from file %s. Continue.)\n\r"), 1, exp_fname);
- else
- Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmAddedToMessage,
- "to message. Continue.)\n\r"), 0);
- ***************
- *** 542,548 ****
- sprintf(buffer, "%s %s", editor, filename);
- }
-
- ! chown(filename, userid, groupid); /* file was owned by root! */
-
- if (( old_raw = RawState()) == ON)
- Raw(OFF);
- --- 598,605 ----
- sprintf(buffer, "%s %s", editor, filename);
- }
-
- ! chown(filename, -1, groupid); /* on systems where we cannot change both, change group id at least */
- ! chown(filename, userid, -1); /* file was owned by root! */
-
- if (( old_raw = RawState()) == ON)
- Raw(OFF);
- ***************
- *** 610,619 ****
- "(Continue entering message. Type ^D or '.' on a line by itself to end.)\n\r");
- }
-
- ! if ((edit_fd = fopen(filename, "a+")) == NULL) {
- err = errno;
- sprintf(buffer, catgets(elm_msg_cat, ElmSet, ElmCouldntOpenAppend,
- ! "Couldn't open %s for appending [%s]."),
- filename, error_description(err));
- Write_to_screen(buffer, 0);
- dprint(1, (debugfile,
- --- 667,676 ----
- "(Continue entering message. Type ^D or '.' on a line by itself to end.)\n\r");
- }
-
- ! if ((edit_fd = fopen(filename, "r+")) == NULL) {
- err = errno;
- sprintf(buffer, catgets(elm_msg_cat, ElmSet, ElmCouldntOpenAppend,
- ! "Couldn't open %s for update [%s]."),
- filename, error_description(err));
- Write_to_screen(buffer, 0);
- dprint(1, (debugfile,
- ***************
- *** 622,627 ****
- --- 679,687 ----
- return(1);
- }
-
- + /* Skip past any existing text */
- + fseek(edit_fd, 0, SEEK_END);
- +
- /** is there already text in this file? **/
-
- if (fsize(edit_fd) > 0L)
-
- Index: src/elm.c
- Prereq: 5.14
- *** ../elm2.4/src/elm.c Mon May 31 15:32:20 1993
- --- src/elm.c Tue Aug 3 15:29:05 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: elm.c,v 5.14 1993/05/31 19:32:20 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.14 $ $State: Exp $
- *
- * This file and all associated files and documentation:
- * Copyright (c) 1988-1992 USENET Community Trust
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: elm.c,v 5.15 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.15 $ $State: Exp $
- *
- * This file and all associated files and documentation:
- * Copyright (c) 1988-1992 USENET Community Trust
- ***************
- *** 15,20 ****
- --- 15,32 ----
- *
- *******************************************************************************
- * $Log: elm.c,v $
- + * Revision 5.15 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.14 1993/05/31 19:32:20 syd
- * With this patch build_address() should treat local mailing
- * lists and other aliases known by the transport agent as valid
- ***************
- *** 103,112 ****
- #endif
- #ifdef BSD
- # include <sys/timeb.h>
- -
- - #undef toupper
- - #undef tolower
- -
- #endif
-
- long bytes();
- --- 115,120 ----
-
- Index: src/expires.c
- Prereq: 5.2
- *** ../elm2.4/src/expires.c Sun Dec 6 21:59:02 1992
- --- src/expires.c Tue Aug 10 14:53:31 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: expires.c,v 5.2 1992/12/07 02:58:56 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: expires.c,v 5.4 1993/08/10 18:53:31 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,36 ----
- *
- *******************************************************************************
- * $Log: expires.c,v $
- + * Revision 5.4 1993/08/10 18:53:31 syd
- + * I compiled elm 2.4.22 with Purify 2 and fixed some memory leaks and
- + * some reads of unitialized memory.
- + * From: vogt@isa.de
- + *
- + * Revision 5.3 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.2 1992/12/07 02:58:56 syd
- * Fix long -> time_t
- * From: Syd
- ***************
- *** 39,51 ****
- # include <sys/time.h>
- #endif
-
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef toupper
- - #undef tolower
- - #endif
- -
- process_expiration_date(date, message_status)
- char *date;
- int *message_status;
- --- 56,61 ----
- ***************
- *** 53,59 ****
- struct tm *timestruct;
- time_t thetime;
- char word1[WLEN], word2[WLEN], word3[WLEN], word4[WLEN], word5[WLEN];
- ! int month = 0, day = 0, year = 0, hour = 0, minute = 0;
- #ifndef _POSIX_SOURCE
- struct tm *localtime();
- time_t time();
- --- 63,69 ----
- struct tm *timestruct;
- time_t thetime;
- char word1[WLEN], word2[WLEN], word3[WLEN], word4[WLEN], word5[WLEN];
- ! int month = 0, day = 0, year = 0, hour = 0, minute = 0, items;
- #ifndef _POSIX_SOURCE
- struct tm *localtime();
- time_t time();
- ***************
- *** 77,84 ****
- so is the first field the month or the day? Standard prob.
- **/
-
- ! sscanf(date, "%s %s %s %s %s",
- ! word1, word2, word3, word4, word5);
-
- if (strlen(word5) != 0) { /* we have form #7 */
- day = atoi(word1);
- --- 87,105 ----
- so is the first field the month or the day? Standard prob.
- **/
-
- ! items = sscanf(date, "%s %s %s %s %s",
- ! word1, word2, word3, word4, word5);
- !
- ! if (items < 5)
- ! word5[0] = '\0';
- ! if (items < 4)
- ! word4[0] = '\0';
- ! if (items < 3)
- ! word3[0] = '\0';
- ! if (items < 2)
- ! word2[0] = '\0';
- ! if (items < 1)
- ! word1[0] = '\0';
-
- if (strlen(word5) != 0) { /* we have form #7 */
- day = atoi(word1);
-
- Index: src/file.c
- Prereq: 5.20
- *** ../elm2.4/src/file.c Thu May 13 23:57:38 1993
- --- src/file.c Tue Aug 3 15:29:06 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: file.c,v 5.20 1993/05/14 03:57:36 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.20 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: file.c,v 5.21 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.21 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: file.c,v $
- + * Revision 5.21 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.20 1993/05/14 03:57:36 syd
- * A couple of calls to want_to() had typos. Here is the patch.
- * From: Jukka Ukkonen <ukkonen@csc.fi>
- ***************
- *** 139,151 ****
- #endif
-
- #include "s_elm.h"
- - #include <ctype.h>
- #include <errno.h>
-
- - #ifdef BSD
- - #undef tolower
- - #endif
- -
- extern int errno;
-
- char *nameof();
- --- 151,158 ----
-
- Index: src/file_util.c
- Prereq: 5.6
- *** ../elm2.4/src/file_util.c Wed Feb 3 14:06:48 1993
- --- src/file_util.c Sun Aug 22 23:26:49 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: file_util.c,v 5.6 1993/02/03 19:06:31 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.6 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: file_util.c,v 5.8 1993/08/23 03:26:24 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.8 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,36 ----
- *
- *******************************************************************************
- * $Log: file_util.c,v $
- + * Revision 5.8 1993/08/23 03:26:24 syd
- + * Try setting group id separate from user id in chown to
- + * allow restricted systems to change group id of file
- + * From: Syd
- + *
- + * Revision 5.7 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.6 1993/02/03 19:06:31 syd
- * Remove extra strchr/strcat/strcpy et al declarations
- * From: Syd
- ***************
- *** 49,61 ****
- #include "headers.h"
- #include "s_elm.h"
- #include <sys/stat.h>
- - #include <ctype.h>
- - #include <errno.h>
- -
- - #ifdef BSD
- - # undef tolower
- - #endif
- -
- #include <errno.h>
-
- #ifdef BSD
- --- 66,71 ----
- ***************
- *** 145,151 ****
- perror(to);
- return(1);
- }
- ! chown( to, userid, groupid);
-
- return(0);
- }
- --- 155,162 ----
- perror(to);
- return(1);
- }
- ! chown( to, -1, groupid);
- ! chown( to, userid, -1); /* at least groupid will change */
-
- return(0);
- }
-
- Index: src/fileio.c
- Prereq: 5.8
- *** ../elm2.4/src/fileio.c Mon Feb 8 13:38:12 1993
- --- src/fileio.c Mon Aug 23 08:28:44 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: fileio.c,v 5.8 1993/02/08 18:38:12 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.8 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: fileio.c,v 5.12 1993/08/23 12:28:23 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.12 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,44 ----
- *
- *******************************************************************************
- * $Log: fileio.c,v $
- + * Revision 5.12 1993/08/23 12:28:23 syd
- + * Fix placement of ifdef for PC_CHOWN
- + * From: syd
- + *
- + * Revision 5.11 1993/08/23 03:26:24 syd
- + * Try setting group id separate from user id in chown to
- + * allow restricted systems to change group id of file
- + * From: Syd
- + *
- + * Revision 5.10 1993/08/10 20:29:52 syd
- + * add PC_CHOWN_RESTRICTED where needed
- + * From: Syd
- + *
- + * Revision 5.9 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.8 1993/02/08 18:38:12 syd
- * Fix to copy_file to ignore unescaped from if content_length not yet reached.
- * Fixes to NLS messages match number of newlines between default messages
- ***************
- *** 60,72 ****
- #include "headers.h"
- #include "s_elm.h"
- #include <sys/stat.h>
- - #include <ctype.h>
- #include <errno.h>
-
- - #ifdef BSD
- - #undef tolower
- - #endif
- -
- extern int errno;
-
- char *error_description();
- --- 85,92 ----
- ***************
- *** 427,440 ****
- /*
- * Chown is restricted to root on BSD unix
- */
- ! (void) chown(fname, new_owner, new_group);
- #else
- ! if((i = chown(fname, new_owner, new_group)) == -1)
- ! ret_code = -1;
- !
- ! dprint(2, (debugfile, "** chown(%s, %d, %d) returns %d [errno=%d] **\n",
- ! fname, new_owner, new_group, i, errno));
- ! #endif
-
- return(ret_code);
-
- --- 447,475 ----
- /*
- * Chown is restricted to root on BSD unix
- */
- ! (void) chown(fname, -1, new_group);
- ! (void) chown(fname, new_owner, -1);
- #else
- ! # ifdef _PC_CHOWN_RESTRICTED
- ! /*
- ! * Chown may or may not be restricted to root in SVR4, if it is,
- ! * then need to copy must be true, and no restore of permissions
- ! * should be performed.
- ! */
- ! if (!pathconf(fname, _PC_CHOWN_RESTRICTED)) {
- ! # endif
- ! if((i = chown(fname, new_owner, new_group)) == -1)
- ! ret_code = -1;
- !
- ! dprint(2, (debugfile, "** chown(%s, %d, %d) returns %d [errno=%d] **\n",
- ! fname, new_owner, new_group, i, errno));
- ! # ifdef _PC_CHOWN_RESTRICTED
- ! } else {
- ! (void) chown(fname, -1, new_group);
- ! (void) chown(fname, new_owner, -1);
- ! }
- ! # endif /* _PC_CHOWN_RESTRICTED */
- ! #endif /* BSD */
-
- return(ret_code);
-
-
- Index: src/forms.c
- Prereq: 5.3
- *** ../elm2.4/src/forms.c Wed Feb 3 14:06:48 1993
- --- src/forms.c Tue Aug 3 15:10:22 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: forms.c,v 5.3 1993/02/03 19:06:31 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.3 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: forms.c,v 5.4 1993/08/03 19:10:22 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,24 ----
- *
- *******************************************************************************
- * $Log: forms.c,v $
- + * Revision 5.4 1993/08/03 19:10:22 syd
- + * The last character of a form field gets zapped if more characters than
- + * the field expects are entered.
- + * From: dwolfe@pffft.sps.mot.com (Dave Wolfe)
- + *
- * Revision 5.3 1993/02/03 19:06:31 syd
- * Remove extra strchr/strcat/strcpy et al declarations
- * From: Syd
- ***************
- *** 399,403 ****
- fgets(buffer, SLEN, stdin);
- no_ret(buffer);
-
- ! if (strlen(buffer) > field_size) buffer[field_size-1] = '\0';
- }
- --- 404,408 ----
- fgets(buffer, SLEN, stdin);
- no_ret(buffer);
-
- ! if (strlen(buffer) > field_size) buffer[field_size] = '\0';
- }
-
- Index: src/hdrconfg.c
- Prereq: 5.2
- *** ../elm2.4/src/hdrconfg.c Sat Nov 21 20:15:16 1992
- --- src/hdrconfg.c Tue Aug 3 15:29:09 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: hdrconfg.c,v 5.2 1992/11/22 01:15:15 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.2 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: hdrconfg.c,v 5.3 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.3 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: hdrconfg.c,v $
- + * Revision 5.3 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.2 1992/11/22 01:15:15 syd
- * Add on initial display or display where the entire screen is being
- * drawn, we should not output the trailing blanks that clear the old
- ***************
- *** 47,59 ****
- #include "headers.h"
- #include "s_elm.h"
-
- - #include <ctype.h>
- -
- - #ifdef BSD
- - #undef toupper
- - #undef tolower
- - #endif
- -
- /*
- * Placement of prompts and messages at the bottom of the screen.
- */
- --- 59,64 ----
- ***************
- *** 572,578 ****
-
- c = getchar();
-
- ! switch ((int)(isupper(c) ? tolower(c) : c)) {
- case 't':
- h = &hmenu_to;
- break;
- --- 577,583 ----
-
- c = getchar();
-
- ! switch (tolower(c)) {
- case 't':
- h = &hmenu_to;
- break;
-
- Index: src/help.c
- Prereq: 5.3
- *** ../elm2.4/src/help.c Sun Apr 11 23:15:49 1993
- --- src/help.c Tue Aug 3 15:29:09 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: help.c,v 5.3 1993/04/12 03:15:41 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.3 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: help.c,v 5.4 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.4 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,31 ----
- *
- *******************************************************************************
- * $Log: help.c,v $
- + * Revision 5.4 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.3 1993/04/12 03:15:41 syd
- * These patches makes 'T' (since it was free) do a Tag and Move command in the
- * index and alias page, and in the builtin pager.
- ***************
- *** 35,41 ****
-
- ***/
-
- - #include <ctype.h>
- #include "headers.h"
- #include "s_elm.h"
-
- --- 47,52 ----
-
- Index: src/in_utils.c
- Prereq: 5.11
- *** ../elm2.4/src/in_utils.c Sun May 16 16:56:19 1993
- --- src/in_utils.c Tue Aug 3 15:29:10 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: in_utils.c,v 5.11 1993/05/16 20:56:18 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.11 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: in_utils.c,v 5.13 1993/08/03 19:28:39 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.13 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,38 ----
- *
- *******************************************************************************
- * $Log: in_utils.c,v $
- + * Revision 5.13 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- + * Revision 5.12 1993/08/03 19:10:50 syd
- + * Patch for Elm 2.4 PL22 to correct handling of SIGWINCH signals on
- + * DecStations with Ultrix 4.2.
- + * The problem was that elm running in an xterm exits silently when the
- + * window is resize. This was caused by incorrect signal handling for BSD.
- + * From: vogt@isa.de
- + *
- * Revision 5.11 1993/05/16 20:56:18 syd
- * fix want-to patch collision
- * From: Jukka Ukkonen <ukkonen@csc.fi>
- ***************
- *** 84,94 ****
- #include "headers.h"
- #include "s_elm.h"
- #include <errno.h>
- - #include <ctype.h>
- -
- - #ifdef BSD
- - # undef tolower
- - #endif
-
- extern int errno; /* system error number */
-
- --- 103,108 ----
- ***************
- *** 572,579 ****
- alarm((unsigned) 0);
- }
- }
- ! else
- ! ch = ReadCh();
- #else
- errno = 0; /* we actually have to do this. *sigh* */
- ch = ReadCh();
- --- 586,595 ----
- alarm((unsigned) 0);
- }
- }
- ! else {
- ! ch = ReadCh();
- ! if (errno == EINTR) ch = NO_OP_COMMAND;
- ! }
- #else
- errno = 0; /* we actually have to do this. *sigh* */
- ch = ReadCh();
-
- Index: src/init.c
- Prereq: 5.16
- *** ../elm2.4/src/init.c Sun Apr 11 23:30:24 1993
- --- src/init.c Sun Aug 22 23:26:51 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: init.c,v 5.16 1993/04/12 03:30:23 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.16 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: init.c,v 5.18 1993/08/23 03:26:24 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.18 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,36 ----
- *
- *******************************************************************************
- * $Log: init.c,v $
- + * Revision 5.18 1993/08/23 03:26:24 syd
- + * Try setting group id separate from user id in chown to
- + * allow restricted systems to change group id of file
- + * From: Syd
- + *
- + * Revision 5.17 1993/08/03 19:28:39 syd
- + * Elm tries to replace the system toupper() and tolower() on current
- + * BSD systems, which is unnecessary. Even worse, the replacements
- + * collide during linking with routines in isctype.o. This patch adds
- + * a Configure test to determine whether replacements are really needed
- + * (BROKE_CTYPE definition). The <ctype.h> header file is now included
- + * globally through hdrs/defs.h and the BROKE_CTYPE patchup is handled
- + * there. Inclusion of <ctype.h> was removed from *all* the individual
- + * files, and the toupper() and tolower() routines in lib/opt_utils.c
- + * were dropped.
- + * From: chip@chinacat.unicom.com (Chip Rosenthal)
- + *
- * Revision 5.16 1993/04/12 03:30:23 syd
- * On AIX, __STDC__ is not defined but it does use unistd.h, etc. In
- * hdrs/def.h, ANS_C already gets defined if __STDC__ or _AIX. But this
- ***************
- *** 128,141 ****
- # include <sys/time.h>
- #endif
-
- - #include <ctype.h>
- #include <errno.h>
-
- - #ifdef BSD
- - #undef toupper
- - #undef tolower
- - #endif
- -
- extern int errno; /* system error number on failure */
- extern char version_buff[];
-
- --- 145,152 ----
- ***************
- *** 273,279 ****
- "Could not open file %s for debug output!\n"),
- filename));
- }
- ! chown(filename, userid, groupid); /* file owned by user */
-
- fprintf(debugfile,
- "Debug output of the ELM program (at debug level %d). Version %s\n\n",
- --- 284,291 ----
- "Could not open file %s for debug output!\n"),
- filename));
- }
- ! chown(filename, -1, groupid); /* file owned by user */
- ! chown(filename, userid, -1); /* at least groupid should change */
-
- fprintf(debugfile,
- "Debug output of the ELM program (at debug level %d). Version %s\n\n",
-
- Index: src/leavembox.c
- Prereq: 5.17
- *** ../elm2.4/src/leavembox.c Mon May 31 15:47:59 1993
- --- src/leavembox.c Sun Aug 22 23:26:52 1993
- ***************
- *** 1,8 ****
-
- ! static char rcsid[] = "@(#)$Id: leavembox.c,v 5.17 1993/05/31 19:47:45 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.17 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- --- 1,8 ----
-
- ! static char rcsid[] = "@(#)$Id: leavembox.c,v 5.19 1993/08/23 03:26:24 syd Exp $";
-
- /*******************************************************************************
- ! * The Elm Mail System - $Revision: 5.19 $ $State: Exp $
- *
- * Copyright (c) 1988-1992 USENET Community Trust
- * Copyright (c) 1986,1987 Dave Taylor
- ***************
- *** 14,19 ****
- --- 14,29 ----
- *
- *******************************************************************************
- * $Log: leavembox.c,v $
- + * Revision 5.19 1993/08/23 03:26:24 syd
- + * Try setting group id separate from user id in chown to
- + * allow restricted systems to change group id of file
- + * From: Syd
- + *
- + * Revision 5.18 1993/08/03 19:59:49 syd
- + * Check for chown restricted and if so, do copyover and
- + * back to avoid need for chown
- + * From: Syd
- + *
- * Revision 5.17 1993/05/31 19:47:45 syd
- * change is_symlink to no_restore and use it for special modes as well
- * From: Syd
- ***************
- *** 542,548 ****
- }
- fclose(temp);
- dprint(2, (debugfile, "\n\n"));
- ! chown(recvd_mail, userid, groupid);
- }
-
- /* If there are any messages to keep, first copy them to a
- --- 552,559 ----
- }
- fclose(temp);
- dprint(2, (debugfile, "\n\n"));
- ! chown(recvd_mail, -1, groupid);
- ! chown(recvd_mail, userid, -1);
- }
-
- /* If there are any messages to keep, first copy them to a
- ***************
- *** 689,694 ****
- --- 700,719 ----
- }
- #endif
-
- + #ifdef _PC_CHOWN_RESTRICTED
- + if (!need_to_copy) {
- + /*
- + * Chown may or may not be restricted to root in SVR4, if it is,
- + * then need to copy must be true, and no restore of permissions
- + * should be performed.
- + */
- + if (pathconf(cur_folder, _PC_CHOWN_RESTRICTED)) {
- + need_to_copy = TRUE;
- + no_restore = TRUE;
- + }
- + }
- + #endif /* _PC_CHOWN_RESTRICTED */
- +
- #ifdef SAVE_GROUP_MAILBOX_ID
- if (folder_type == SPOOL)
- setgid(mailgroupid);
-
-